<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="../bootstrap-5.1.3-dist/css/bootstrap.css">
  <script src="../bootstrap-5.1.3-dist/js/bootstrap.js"></script>
</head>

<body class="container">
  <h3 class="mb-4">浮动效果</h3>
  <div class="clearfix text-white border border-primary p-3">
    <div class="float-start bg-primary">左边浮动</div>
    <div class="float-end bg-primary">右边浮动</div>
  </div>
</body>

</html>